package com.yycx.module.bus.client.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @author zyf
 */

public enum SendTypeEnum {

    XK(1, "现款"),
    YSK(2, "预收款"),
    ZBJ(3, "资保金"),
    QZ(4, "资信");


    @EnumValue
    private Integer code;
    private String name;

    SendTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    SendTypeEnum() {

    }

    public static String getName(Integer code) {
        String v = "";
        for (SendTypeEnum sendTypeEnum : values()) {
            if (sendTypeEnum.code.equals(code)) {
                v = sendTypeEnum.getName();
                break;
            }
        }
        return v;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }
}
